#!/bin/sh

insmod /root/ko/drv_sht.ko
insmod /root/ko/drv_18b20.ko
insmod /root/ko/drv_ctrb.ko
export set HOME=/root
export set QTDIR=/opt/qt
export set TSLIB_ROOT=/opt/ts
export set QWS_MOUSE_PROTO="TSLIB:/dev/event0"
export set QWS_DISPLAY="LinuxFB:/dev/fb0"
export set QWS_DISPLAY="LinuxFB:mmWidth130:mmHeight100:0"
export set QWS_SIZE="320x240"
export set QT_PLUGIN_PATH=$QTDIR/plugins/
export set QT_QWS_FONTDIR=$QTDIR/lib/fonts
export set PATH=$QTDIR/bin:$PATH
export set LD_LIBRARY_PATH=$QTDIR/lib:$QTDIR/plugins/imageformats:$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
export set TSLIB_CALIBFILE=/etc/pointercal
export set TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export set TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export set TSLIB_FBDEVICE=/dev/fb0
export set TSLIB_TSDEVICE=/dev/event0

if [ -s "etc/pointercal" ] ; then
	break
else
	ts_calibrate
fi
hw_ui -qws &

